package nameless.aistudy.domain.model.subjects.english.vocabulary.word;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import nameless.aistudy.domain.model.subjects.english.vocabulary.dto.WordDetailDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface WordRepo extends BaseMapper<Word> {

    //定义方法;
    WordDetailDTO getWordDetail(Integer wordId);

    @Select("SELECT * FROM subject_english_word WHERE spell = #{spell}")
    Word selectBySpell(@Param("spell") String spell);
}
